/*
 * ZohoStrategy.java
 */

package pl.edu.pw.mini.adapter;

import pl.edu.pw.mini.gui.IInterfaceLogic;
import pl.edu.pw.mini.gui.ZohoInterfaceLogic;
import pl.edu.pw.mini.state.StateManager;
import pl.edu.pw.mini.test.ZohoTest;
import pl.edu.pw.mini.user.UserData;
import pl.edu.pw.mini.user.UserDataManager;

/**
 *
 * @author cdendek
 */
public class ZohoStrategy implements IAdapterStrategy{

    private static ZohoStrategy zStrategy = new ZohoStrategy();
    
    /** Creates a new instance of ZohoStrategy */
    protected ZohoStrategy() {
    }
    public IAdapter getAdapter() {
        return ZohoAdapter.getAdapter();
    }
    
    public IConnectionState getConnectionState(){
        return StateManager.getZoho();
    }
    
    public void setConnectionState(IConnectionState state){
        StateManager.storeZoho((ZohoAdapter.ZohoConnectionState)state);
    }
    
    
    public String getSampleLogin(){
        return ZohoTest.testLogin;
    }
    
    public String getSamplePassword(){
        return ZohoTest.testPassword;
    }

    public IInterfaceLogic getInterfaceLogic() {
        return ZohoInterfaceLogic.getInstance();
    }

    public String getServiceId() {
        return "Zoho";
    }

    public static ZohoStrategy getInstance() {
        return zStrategy;
    }
    
    public UserData getUserData(){
        return UserDataManager.getZohoUserData();
    }
    
    public void setUserData(UserData userData){
        UserDataManager.setZohoUserData(userData);
    }
    
}
